#include <iostream>
#define LEN 10
using namespace std;

int main()
{
	int i, v[LEN] = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19}, r, ok = 1;
	r = v[1] - v[0];
	
	for (i = 2; i < LEN; ++i)
		if (v[i] - v[i - 1] != r)
			ok = 0;
	
	cout << ok;
	
	return 0;
}